package com.moneywelcome.investfacade;

import com.moneywelcome.investfacade.dto.DividendRecordDto;
import com.moneywelcome.investfacade.dto.FinancialDto;
import com.moneywelcome.investfacade.dto.IncomeRecordDto;
import com.moneywelcome.investfacade.dto.UserFinancialDto;
import com.moneywelcome.investfacade.vo.RecordPageVo;
import com.moneywelcome.results.PageResult;
import com.moneywelcome.results.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(
        contextId="investIncomeApi",//服务名字
        value = "invest" // 区分不同client
)
public interface InvestIncomeApi {
    @PostMapping("/income")
    Result<PageResult<IncomeRecordDto>> incomeRecord(@RequestBody RecordPageVo recordPageVo);
    @GetMapping("/financial")
    Result<PageResult<UserFinancialDto>> getUserFinancial(@RequestBody RecordPageVo recordPageVo);
    @PostMapping("/dividendRecord")
    Result<PageResult<DividendRecordDto>> dividendRecord(@RequestBody RecordPageVo recordPageVo);
}
